import { AppBaseEntity } from 'src/shared/database/baseEntity';
import { Column, Entity } from 'typeorm';

@Entity({
  name: 'product_images',
  comment: '商品图片表',
})
export class ProductImage extends AppBaseEntity {
  @Column({
    comment: '图片url',
    name: 'url',
  })
  url: string;

  @Column({
    comment: '商品id',
    name: 'product_id',
  })
  productId: number;

  @Column({
    comment: '是否为主图',
    name: 'is_main',
    default: false,
  })
  isMain: boolean;
}
